Skip to content

Commit a2884a8

Browse files
committed
item bugfix
1 parent 5d8fe1e commit a2884a8

File tree

6 files changed

+642
-1027
lines changed

6 files changed

+642
-1027
lines changed

src/MiNET/MiNET/Blocks/BlockFactory.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,6 @@ public static Block GetBlockById(int blockId)
368368
187 => new AcaciaFenceGate(),
369369
188 => new RepeatingCommandBlock(),
370370
189 => new ChainCommandBlock(),
371-
190 => new HardGlassPane(),
372-
191 => new HardStainedGlassPane(),
373-
192 => new ChemicalHeat(),
374371
193 => new SpruceDoor(),
375372
194 => new BirchDoor(),
376373
195 => new JungleDoor(),
@@ -380,9 +377,7 @@ public static Block GetBlockById(int blockId)
380377
199 => new Frame(),
381378
200 => new ChorusFlower(),
382379
201 => new PurpurBlock(),
383-
202 => new ColoredTorchRg(),
384380
203 => new PurpurStairs(),
385-
204 => new ColoredTorchBp(),
386381
205 => new UndyedShulkerBox(),
387382
206 => new EndBricks(),
388383
207 => new FrostedIce(),
@@ -408,31 +403,24 @@ public static Block GetBlockById(int blockId)
408403
227 => new GrayGlazedTerracotta(),
409404
228 => new SilverGlazedTerracotta(),
410405
229 => new CyanGlazedTerracotta(),
411-
230 => new Chalkboard(),
412406
231 => new BlueGlazedTerracotta(),
413407
232 => new BrownGlazedTerracotta(),
414408
233 => new GreenGlazedTerracotta(),
415409
234 => new RedGlazedTerracotta(),
416410
235 => new BlackGlazedTerracotta(),
417411
236 => new Concrete(),
418412
237 => new ConcretePowder(),
419-
238 => new ChemistryTable(),
420-
239 => new UnderwaterTorch(),
421413
240 => new ChorusPlant(),
422414
241 => new StainedGlass(),
423-
242 => new Camera(),
424415
243 => new Podzol(),
425416
244 => new Beetroot(),
426417
245 => new Stonecutter(),
427418
246 => new Glowingobsidian(),
428419
247 => new Netherreactor(),
429420
248 => new InfoUpdate(),
430421
249 => new InfoUpdate2(),
431-
250 => new MovingBlock(),
432422
251 => new Observer(),
433423
252 => new StructureBlock(),
434-
253 => new HardGlass(),
435-
254 => new HardStainedGlass(),
436424
255 => new Reserved6(),
437425
257 => new PrismarineStairs(),
438426
258 => new DarkPrismarineStairs(),
@@ -522,17 +510,11 @@ public static Block GetBlockById(int blockId)
522510
462 => new SweetBerryBush(),
523511
463 => new Lantern(),
524512
464 => new Campfire(),
525-
466 => new Jigsaw(),
526513
467 => new Wood(),
527514
468 => new Composter(),
528515
469 => new LitBlastFurnace(),
529-
470 => new LightBlock(),
530516
471 => new WitherRose(),
531517
472 => new StickyPistonArmCollision(),
532-
473 => new BeeNest(),
533-
474 => new Beehive(),
534-
475 => new HoneyBlock(),
535-
476 => new HoneycombBlock(),
536518
541 => new Chain(),
537519
_ => new Block(blockId)
538520
};

src/MiNET/MiNET/Blocks/IronDoor.cs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,10 @@
2929

3030
namespace MiNET.Blocks
3131
{
32-
public partial class IronDoor : Block
32+
public partial class IronDoor : DoorBase
3333
{
3434
public IronDoor() : base(71)
3535
{
36-
IsTransparent = true;
37-
BlastResistance = 25;
38-
Hardness = 5;
39-
}
40-
41-
protected override bool CanPlace(Level world, Player player, BlockCoordinates blockCoordinates, BlockCoordinates targetCoordinates, BlockFace face)
42-
{
43-
return world.GetBlock(blockCoordinates).IsReplaceable && world.GetBlock(blockCoordinates + Level.Up).IsReplaceable;
44-
}
45-
46-
public override void BreakBlock(Level level, BlockFace face, bool silent = false)
47-
{
48-
// Remove door
49-
if (UpperBlockBit) // Is Upper?
50-
{
51-
level.SetAir(Coordinates + Level.Down);
52-
}
53-
else
54-
{
55-
level.SetAir(Coordinates + Level.Up);
56-
}
57-
58-
base.BreakBlock(level, face, silent);
59-
}
60-
61-
public override bool Interact(Level world, Player player, BlockCoordinates blockCoordinates, BlockFace face, Vector3 faceCoord)
62-
{
63-
return true;
6436
}
6537
}
6638
}

src/MiNET/MiNET/Blocks/IronTrapdoor.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,10 @@
3030

3131
namespace MiNET.Blocks
3232
{
33-
public partial class IronTrapdoor : Block
33+
public partial class IronTrapdoor : TrapdoorBase
3434
{
3535
public IronTrapdoor() : base(167)
3636
{
37-
IsTransparent = true;
38-
BlastResistance = 25;
39-
Hardness = 5;
40-
}
41-
42-
public override bool PlaceBlock(Level world, Player player, BlockCoordinates targetCoordinates, BlockFace face, Vector3 faceCoords)
43-
{
44-
UpsideDownBit = faceCoords.Y > 0.5 && face != BlockFace.Up || face == BlockFace.Down;
45-
46-
return false;
47-
}
48-
49-
public override bool Interact(Level world, Player player, BlockCoordinates blockCoordinates, BlockFace face, Vector3 faceCoord)
50-
{
51-
OpenBit = !OpenBit;
52-
world.SetBlock(this);
53-
54-
return true;
5537
}
5638
}
5739
}

0 commit comments

Comments
 (0)