Skip to content

Commit b9aaca5

Browse files
committed
Complete adjustment
1 parent 948db25 commit b9aaca5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/machines/entities/ExpCollector.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public boolean isSynchronized() {
124124

125125
protected void tick(Block block) {
126126
Location location = block.getLocation();
127-
Iterator<Entity> iterator = block.getWorld().getNearbyEntities(location, 4.0, 4.0, 4.0, n -> n instanceof ExperienceOrb && n.isValid()).iterator();
127+
Iterator<Entity> iterator = block.getWorld().getNearbyEntities(location, range, range, range, n -> n instanceof ExperienceOrb && n.isValid()).iterator();
128128
int experiencePoints = 0;
129129

130130
while (iterator.hasNext() && experiencePoints == 0) {
@@ -182,16 +182,18 @@ public int getEnergyConsumption() {
182182
return energyConsumedPerTick;
183183
}
184184

185-
public void setEnergyConsumption(int energyConsumedPerTick) {
185+
public ExpCollector setEnergyConsumption(int energyConsumedPerTick) {
186186
this.energyConsumedPerTick = energyConsumedPerTick;
187+
return this;
187188
}
188189

189190
@Override
190191
public int getCapacity() {
191192
return energyCapacity;
192193
}
193194

194-
public void setCapacity(int energyCapacity) {
195+
public ExpCollector setCapacity(int energyCapacity) {
195196
this.energyCapacity = energyCapacity;
197+
return this;
196198
}
197199
}

src/main/java/io/github/thebusybiscuit/slimefun4/implementation/setup/SlimefunItemSetup.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,9 @@ public int getEnergyConsumption() {
23812381
.register(plugin);
23822382

23832383
new ExpCollector(itemGroups.electricity, SlimefunItems.EXP_COLLECTOR, RecipeType.ENHANCED_CRAFTING_TABLE,
2384-
new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.AUTO_ENCHANTER, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_BRONZE_INGOT})
2384+
new ItemStack[] {null, SlimefunItems.BLISTERING_INGOT_3, null, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.AUTO_ENCHANTER, SlimefunItems.WITHER_PROOF_OBSIDIAN, SlimefunItems.ALUMINUM_BRONZE_INGOT, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ALUMINUM_BRONZE_INGOT}, 4.0)
2385+
.setEnergyConsumption(10)
2386+
.setCapacity(1024)
23852387
.register(plugin);
23862388

23872389
new FoodComposter(itemGroups.electricity, SlimefunItems.FOOD_COMPOSTER, RecipeType.ENHANCED_CRAFTING_TABLE,

0 commit comments

Comments
 (0)